package com.sinotrans.auth.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.sinotrans.common.config.AbstractSwaggerConfig;

import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * swagger配置
 * 
 * @author ligaofu
 *
 */
@Configuration
@EnableSwagger2
public class SwaggerConfig extends AbstractSwaggerConfig {

	@Value("${spring.application.name:}")
	private String application;

	@Bean
	public Docket createApi() {
		return super.createApi();
	}

	protected ApiInfo apiInfo() {
		return new ApiInfoBuilder().title(application).version("1.0").build();
	}

}
